package com.gjy.design.decorator.s3;

/**
 * @author gjy
 * @version 1.0
 * @since 2025-11-10 10:31:17
 */
public class DemoFunctional {

    public static void main(String[] args) {
        String raw = "  <script>alert('xss')</script>\u0001Hello 🙂  ";
        SmartFilter pipe = Filters.trim()
                .then(Filters.removeControlChars())
                .then(Filters.lengthLimit(64))
                .then(Filters.escapeHtml());

        String safe = pipe.apply(raw);
        System.out.println(safe);
    }

}
